<template>
  <div id="app">
    <router-view />
    <!-- 引用底部公共组件 -->
    <FooterGuide v-show="$route.meta.requiresAuth"></FooterGuide>
    <!-- <FooterGuide v-show="flag"></FooterGuide> -->
  </div>
</template>

<script>
import FooterGuide from './components/FooterGuide/FooterGuide'
export default {
  name: 'App',
  components:{
    FooterGuide
  },
  data(){
    return {
      // flag:true,
    }
  },
  created(){
  },
  mounted(){
    this.$store.dispatch('getUserInfo')
  }
 /*  mounted(){
    this.$route.path()
  },
  // vue的核心就是操作数据
  // 在登录页面flag=false
  watch:{
    '$route.path':function (newVal,oldVal){
      if(newVal=='/login') {
        this.flag=false
      }else {
        this.flag=true
      }
    }
  } */
}
</script>

<style lang="stylus" rel="stylesheet/stylus">
#app
    width 100%
    height 100%
    background #f5f5f5
</style>
